package com.annotation.autowired;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AutowiredConfig {


    @Bean
    public AutowiredDao autowiredDao() {
        AutowiredDao autowiredDao = new AutowiredDao();
        autowiredDao.setId(1);
        return autowiredDao;
    }

    @Bean
    public AutowiredDao autowiredDao2() {
        AutowiredDao autowiredDao = new AutowiredDao();
        autowiredDao.setId(1);
        return autowiredDao;
    }

    @Bean
    public AutowiredService autowiredService() {
        return new AutowiredService();
    }

}
